<template>
    <div class="detail">
        <h3>新闻标题：{{listdetail.id}}</h3>
        <p> 发表来源：{{listdetail.thumbnailUrl}}</p>
        <p>点击次数：{{listdetail.id}}</p>
        <div>{{listdetail.title}}</div>   
        <com :myid=id></com>
    </div>
</template>
<script>
import com from './subcommont/commom'
export default {
    data(){
        return{
            id:this.$route.params.id,
            listdetail:[]
        }
    },
    components:{
        com
    },
    created(){
        this. getnews()
    },
    methods:{
        getnews(){
            this.$http.get('http://jsonplaceholder.typicode.com/photos/'+this.id).then(result=>{
                this.listdetail=result.body;
            
            })
        }
    }
}
</script>
<style scoped>
  .detail{
      padding: 4px;
  }
</style>


